import {Children, lazy}  from "react"
const Index =lazy(()=>import('../views/Index'))
import Login from "../views/Login"

const Console=lazy(()=>import("../views/operate/Console"))//控制台
const Goodscount=lazy(()=>import("../views/operate/Goodscount"))//商品统计



const Goodsmanger=lazy(()=>import("../views/goods/Goodsmanger"))//商品管理
const Goodstype=lazy(()=>import("../views/goods/Goodstype"))//商品分类
const GoodsSpecs=lazy(()=>import("../views/goods/GoodsSpecs"))//商品商品规格
const Goodsorder=lazy(()=>import("../views/goods/Goodsorder"))//商品商品规格
const UserRank=lazy(()=>import("../views/goods/UserRank"))//商品商品规格
const Usermanger=lazy(()=>import("../views/goods/Usermanger"))//商品商品规格
const Articletype=lazy(()=>import("../views/content/Articletype"))//文章分类
const Articlemanger=lazy(()=>import("../views/content/Articlemanger"))//文章的管理


const router= [
    {
        path:"/login",
        element:<Login></Login>,
        meta:{
            title:"登录"
        }
    },
    {
        path:"/",
        element:<Index></Index>,
        meta:{title:"首页"},
        children:[
            {
                index:true,
                // path:"console",//   /console
                element:<Console />,
                meta:{title:"控制台"}
            },
            {
                path:"goodscount",
                element:<Goodscount></Goodscount>,
                meta:{title:"商品统计"}
            },
            {
                path:"goodsmanger",
                element:<Goodsmanger></Goodsmanger>,
                meta:{title:"商品管理"}
            },
            {
                path:"goodstype",
                element:<Goodstype></Goodstype>,
                meta:{title:"商品分类"}
            },
            {
                path:"goodsspecs",
                element:<GoodsSpecs></GoodsSpecs>,
                meta:{title:"商品规格"}
            },
            {
                path:"userrank",
                name:"UserRank",
                element:<UserRank></UserRank>
            },
            {
                path:"goodesorder",
                name:"Goodsorder",
                element:<Goodsorder></Goodsorder>
            },
          
            {
                path:"usermanger",
                name:"Usermanger",
                element:<Usermanger></Usermanger>
            },
            {
                path:"articletype",
                name:"Articletype",
                element:<Articletype></Articletype>
            },
            {
                path:"articlemanger",
                name:"Articlemanger",
                element:<Articlemanger></Articlemanger>
            },
        ]
    },
    
    {
        path:"*",
        element:<h1>NOT FOUND 404</h1>,
        meta:{
            title:"404"
        }
    }
]
export default router